#pragma once

#include <string>
#include "ApproxAlgorithm.h"

class LevenshteinAlgorithm final : public ApproxAlgorithm {
public:

    LevenshteinAlgorithm(double similarity_threshold) :
                         ApproxAlgorithm(similarity_threshold) { }

    LevenshteinAlgorithm(const LevenshteinAlgorithm&) = delete;
    LevenshteinAlgorithm& operator=(const LevenshteinAlgorithm&) = delete;
    virtual ~LevenshteinAlgorithm() = default;

    virtual double getSim(const FilePairType& file_pair) const override;

private:
    unsigned int getLevDist(const std::string&s1, const std::string& s2) const;
};
